from launch import LaunchDescription
from launch_ros.actions import LifecycleNode, Node
from ament_index_python.packages import get_package_share_directory
import os

def generate_launch_description():
    config = os.path.join(
        get_package_share_directory('center_detection_second'),
        'config',
        'center_detector_second.params.yaml'
    )
    
    return LaunchDescription([
        LifecycleNode(
            package='center_detection_second',
            executable='center_detector_second',
            name='center_detector_second',
            namespace='',
            parameters=[config],
            output='screen'
        )
    ])